package com.expdatacloud.service.impl;

import com.expdatacloud.entity.log.HandleLogBean;
import com.expdatacloud.mapper.LogMapper;
import com.expdatacloud.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author jie
 * @date 2019/12/23 -16:58
 */
@Service
public class LogServiceImpl implements LogService {
    @Autowired
    private LogMapper logMapper;

    @Override
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public void info(HandleLogBean handleLogBean) {
        logMapper.info(handleLogBean);
    }

    @Override
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public void error(HandleLogBean handleLogBean) {
        logMapper.error(handleLogBean);
    }
}
